package com.twetec.cms.service.website;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.twetec.cms.model.po.website.ArticlePO;
import com.twetec.cms.model.po.website.ColumnReferenceArticlePO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 文章表 服务类
 * </p>
 *
 * @author zhxl
 * @since 2021-10-08
 */
public interface ArticleService extends IService<ArticlePO> {


    ArticlePO saveArticle(Long siteId, Long columnId, String title, String attribute, String type, String releaseChannel, String origin, String author, Date releaseTime, Date gmtAnnouncementStart, Date gmtAnnouncementEnd, String coverListJson, String coverType, String summary, Long sortArticleId, String sortType, Long userId);


    Long mergeArticle(String articleStatus, String articleMergeStatus, Long siteId, Long columnId, String title, String attribute, String type, String releaseChannel, String origin, String author, Date releaseTime, Date gmtAnnouncementStart, Date gmtAnnouncementEnd, String coverListJson, String coverType, String summary, Long sortArticleId, String sortType, Long userId);


    Long updateArticle(Long id, String title, String attribute, String type, String releaseChannel, String origin, String author, Date releaseTime, Date gmtAnnouncementStart, Date gmtAnnouncementEnd, String coverListJson, String coverType, String summary, Long sortArticleId, String sortType, Long userId);


    Page<ArticlePO> getReferenceArticle(Page<ArticlePO> page, QueryWrapper<ArticlePO> queryWrapper);


    boolean replace(ArrayList<String> articleIds, String originContent, String replaceContent);

}
